import request from "@/utils/request"

// 每一条数据
export interface cateGoryInfoType{
    id:number,
    name:string,
    category1Id?:number,
    category2Id?:number,
}

// 列表数据
export type cateGoryListType = cateGoryInfoType[]

export const reqcateGory1List = ()=>{
    return request.get<null,cateGoryListType>(`/admin/product/getCategory1`)
}
export const reqcateGory2List = (category1Id:number)=>{
    return request.get<null,cateGoryListType>(`/admin/product/getCategory2/${category1Id}`)
}
export const reqcateGory3List = (category2Id:number)=>{
    return request.get<null,cateGoryListType>(`/admin/product/getCategory3/${category2Id}`)
}